<div class="da-operations">
  <div class="da-operations-notice" dDropDown [trigger]="'click'" [closeScope]="'blank'" dDropDownToggle appendToBody
    [appendToBodyDirections]="['leftDown', 'leftUp']">
    <i class="icon icon-devcloud-service"></i>
    <div class="da-notice-modal2" dDropDownMenu role="menu">
      <app-header-fast-nav></app-header-fast-nav>
    </div>
  </div>
  <div class="da-operations-notice" dDropDown [trigger]="'click'" dDropDownToggle appendToBody [closeScope]="'blank'" >
    <d-badge [count]="noticeCount || 0" status="danger">
      <i class="icon icon-notice"></i>
    </d-badge>
    <div class="da-notice-modal" dDropDownMenu role="menu" >
      <da-header-notice (countEvent)="handleNoticeCount($event)"></da-header-notice>
    </div>
  </div>
  <div class="da-operations-notice" (click)="personalizeConfig()">
    <i class="icon icon-color"></i>
  </div>
  <div class="da-multi-settings">
    <i class="icon icon-setting" (click)="openSettingDrawer()"></i>
  </div>
  <div class="da-operations-user" dDropDown [trigger]="'click'" dDropDownToggle [closeScope]="'blank'">
    <d-avatar *ngIf="!this.user?.headUrl" [name]="this.name"></d-avatar>
    <d-avatar *ngIf="this.user?.headUrl" [imgSrc]="this.headUrl"></d-avatar>
    <span class="da-user-name">{{ user?.username }}</span>
    <ul dDropDownMenu class="devui-dropdown-menu devui-scrollbar" role="menu" style="min-width: 120px">
      <ng-container *ngIf="haveLoggedIn; else login">
        <li role="menuitem">
          <a class="devui-dropdown-item" (click)="PersonalCenter()"><i class="icon icon-mine"></i>{{ 'header.userCenter'
            | translate }}</a>
        </li>
        <li role="menuitem">
          <a class="devui-dropdown-item" (click)="EditPassword()"><i class="icon icon-lock-private"></i>修改密码</a>
        </li>
        <li role="menuitem">
          <a class="devui-dropdown-item" [routerLink]="['/pages', 'user', 'settings']"><i
              class="icon icon-global-guide"></i>使用指南</a>
        </li>
        <li role="menuitem " (click)="handleUserOps('logout')" class="login-out">
          <a class="devui-dropdown-item logout"><i class="icon icon-exit"></i>{{ 'header.logout' | translate }}</a>
        </li>
      </ng-container>
    </ul>
  </div>
</div>
<ng-template #login>
  <li role="menuitem">
    <a class="devui-dropdown-item"><i class="icon icon-assign"></i>{{ 'header.login' | translate }}</a>
  </li>
  <li role="menuitem">
    <a class="devui-dropdown-item"><i class="icon icon-add-member"></i>{{ 'header.register' | translate }}</a>
  </li>
</ng-template>
<d-toast [value]="msgs" [life]="2000" [styleClass]="'custom-class'" [style]="{ left: '50%',top:'10px' }"></d-toast>
